Light-weight Locks

نویسندگان

  • Nitin Garg
  • Ed Zhu
  • Fabiano C. Botelho
چکیده

In this paper, we propose a new approach to building synchronization primitives, dubbed “lwlocks” (short for light-weight locks). The primitives are optimized for small memory footprint while maintaining efficient performance in low contention scenarios. A read-write lwlock occupies 4 bytes, a mutex occupies 4 bytes (2 if deadlock detection is not required), and a condition variable occupies 4 bytes. The corresponding primitives of the popular pthread library occupy 56 bytes, 40 bytes and 48 bytes respectively on the x86-64 platform. The API for lwlocks is similar to that of the pthread library but covering only the most common use cases. Lwlocks allow explicit control of queuing and scheduling decisions in contention situations and support “asynchronous” or “deferred blocking” acquisition of locks. Asynchronous locking helps in working around the constraints of lockordering which otherwise limits concurrency. The small footprint of lwlocks enables the construction of data structures with very fine-grained locking, which in turn is crucial for lowering contention and supporting highly concurrent access to a data structure. Currently, the Data Domain File System uses lwlocks for its in-memory inode cache as well as in a generic doubly-linked concurrent list which forms the building block for more sophisticated

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Comparative Study on the Mechanism, Form and Decorations of Contemporary Chaleshtor Locks and Those from the Safavid Isfahan

Lock is a device that assures safety of human’s life. Iranian locksmiths, in addition to making locks and meeting the essential needs, valued the decorative aspects of such tools. Including pendants and movable types, these locks are portable and they are different from standard, ordinary ones. Artists in this field have incorporated a wide range of artistic, spiritual, cultural and aesthetic v...

متن کامل

The Secret and Beauty of Ancient Chinese Padlocks

Most ancient Chinese padlocks are key-operated locks with splitting springs, and partially keyless letter-combination locks. They can be characterized based on the types of locks, the shapes of locks, the engravings of locks, the materials of locks, and the mechanisms of locks. Some locks and keys are not only very beautiful and artistic colorful, but also with various designs. As a result, a s...

متن کامل

Priority Inheritance Spin Locks for Multiprocessor Real-Time Systems

When a real-time system is realized on a shared-memory multiprocessor, priority-ordered spin locks are often required to reduce priority inversions. However, simple priority-ordered spin locks can cause uncontrolled priority inversions when they are used for nested spin locks. This paper points out the problem of uncontrolled priority inversions in the context of spin locks and proposes priorit...

متن کامل

Non-scalable locks are dangerous

Several operating systems rely on non-scalable spin locks for serialization. For example, the Linux kernel uses ticket spin locks, even though scalable locks have better theoretical properties. Using Linux on a 48-core machine, this paper shows that non-scalable locks can cause dramatic collapse in the performance of real workloads, even for very short critical sections. The nature and sudden o...

متن کامل

Preemption Adaptivity in Time-Published Queue-Based Spin Locks

The proliferation of multiprocessor servers and multithreaded applications has increased the demand for high-performance synchronization. Traditional scheduler-based locks incur the overhead of a full context switch between threads and are thus unacceptably slow for many applications. Spin locks offer low overhead, but they either scale poorly on large-scale SMPs (test-and-set style locks) or b...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1109.2638  شماره 

صفحات  -

تاریخ انتشار 2011